package tester;

import java.util.List;
import java.util.ArrayList;
import java.util.Collections;

import data.*;
import settings.*;

public class Testbench {
	public static void main(String[] args) {
		//convert data into an ArrayList<DataPoint>
		List<DataPoint> al_datapoint = Text_to_Data.text_to_data(Global.data_location);
		
		//the sort of the data in the ArrayList
		Collections.sort(al_datapoint);		
		
		//break data into disk pages
		ArrayList<DiskPage> al_diskpage = DiskPage.dataPoints_to_diskPages(al_datapoint);
		
		for(int i=0; i<al_diskpage.size(); i++)
			System.out.println(al_diskpage.get(i).getFirstValue());
		
		System.out.println("____");
		
		DiskPage dp1 = al_diskpage.get(0);
		System.out.println(dp1.getFirstValue());
		
		while(dp1!=null){
			if(dp1.getPrev()!=null) System.out.println(dp1.getPrev().getFirstValue());
			dp1=dp1.getNext();
		}
	}
}